home *** CD-ROM | disk | FTP | other *** search
- Path: csus.edu!NewsWatcher!user
- From: vreeland@sfsu.edu (Robert W. Vreeland Jr.)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Datatypes - Help!
- Date: Mon, 01 Jan 1996 14:17:24 -0800
- Organization: California State University Sacramento
- Message-ID: <vreeland-0101961417240001@192.0.2.1>
- NNTP-Posting-Host: vreeland@orion.sfsu.edu
-
-
-
- Help! I'm trying to load in and display a picture using datatypes. The
- picture is loaded in and decoded but I can't display it because I always
- get a Bitmap pointer back of NULL. What is wrong with this code? (I can
- display a test image just fine with multiview so I know the image and the
- datatype are okay. The problem has to lie in my code.)
-
-
- if (!DataTypesBase)
- return(1);
- if (!(o=NewDTObject(path,DTA_GroupID,GID_PICTURE,
- TAG_END)))
- return(1);
- ilbm->dtf.MethodID=DTM_FRAMEBOX;
- ilbm->dtf.dtf_GInfo=NULL;
- ilbm->dtf.dtf_FrameInfo=&ilbm->fri;
- ilbm->dtf.dtf_ContentsInfo=&ilbm->fri;
- ilbm->dtf.dtf_SizeFrameInfo=sizeof(struct FrameInfo);
- ilbm->dtf.dtf_FrameFlags=0L;
- if (!DoMethodA(o,(Msg)&ilbm->dtf)) {
- DisposeDTObject(o);
- return(1);
- }
- ilbm->gpl.MethodID=DTM_PROCLAYOUT;
- ilbm->gpl.gpl_GInfo=NULL;
- ilbm->gpl.gpl_Initial=1L;
- if (!DoMethodA(o,(Msg)&ilbm->gpl)) {
- DisposeDTObject(o);
- return(1);
- }
- GetDTAttrs(o,PDTA_ModeID,&ilbm->modeid,
- PDTA_CRegs,&ilbm->cregs,
- PDTA_NumColors,&ilbm->numcolors,
- PDTA_BitMapHeader,&ilbm->bmhd,
- PDTA_BitMap,&ilbm->bm,TAG_END);
- if (!ilbm->bm) { ...we always get NULL back from the datatype?
- DisposeDTObject(o);
- return(1);
- }
-
-
- Thanks in advance,
-
- Robert.
-